<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <h3 class="panel-title">成本详情</h3>
    </div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-6">
                <table class="table table-bordered">
                    <tr>
                        <th width="120">成本单号</th>
                        <td>{$row.cost_no}</td>
                    </tr>
                    <tr>
                        <th>成本类型</th>
                        <td>{$row.costType.name}</td>
                    </tr>
                    <tr>
                        <th>生产计划</th>
                        <td>{$row.plan.plan_name|default:'未关联计划'}</td>
                    </tr>
                    <tr>
                        <th>订单编号</th>
                        <td>{$row.plan.order.order_no|default:'未关联订单'}</td>
                    </tr>
                    <tr>
                        <th>成本金额</th>
                        <td>¥{$row.amount}</td>
                    </tr>
                </table>
            </div>
            <div class="col-md-6">
                <table class="table table-bordered">
                    <tr>
                        <th width="120">成本日期</th>
                        <td>{$row.cost_date}</td>
                    </tr>
                    <tr>
                        <th>状态</th>
                        <td>
                            {if $row.status == 1}
                                <span class="label label-success">已确认</span>
                            {else}
                                <span class="label label-warning">待确认</span>
                            {/if}
                        </td>
                    </tr>
                    <tr>
                        <th>操作员</th>
                        <td>{$row.operator.username}</td>
                    </tr>
                    <tr>
                        <th>创建时间</th>
                        <td>{$row.createtime|datetime}</td>
                    </tr>
                    <tr>
                        <th>更新时间</th>
                        <td>{$row.updatetime|datetime}</td>
                    </tr>
                </table>
            </div>
        </div>
        
        <div class="row">
            <div class="col-md-12">
                <h4>成本描述</h4>
                <p>{$row.description}</p>
            </div>
        </div>
        
        {if $row.remark}
        <div class="row">
            <div class="col-md-12">
                <h4>备注</h4>
                <p>{$row.remark}</p>
            </div>
        </div>
        {/if}
    </div>
</div>
